home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / E-G / Financial Portfolio v1.8.cpt / Financial Portfolio v1.8 / stack_-1.xml < prev    next >
Extensible Markup Language  |  1991-09-30  |  12KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.8</name>
  5.     <id>-1</id>
  6.     <cardCount>38</cardCount>
  7.     <cardID>3020</cardID>
  8.     <listID>12221</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>---- ‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢-- ‚Ä¢‚Ä¢‚Ä¢  Financial Portfolio  ‚Ä¢‚Ä¢‚Ä¢-- ‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢---- by Michael J. Foreman, 1991---- Please send me feedback - America Online:"Kid Doctor"---- This stack uses:--    Jon Pugh's HPopupMenu XFCN, version 2.6--    Dwight Mayo's FormatNum XFCN v1.1--    Eric Celeste's Strip XFCN---- Graphing ability adapted from Claris' Graph Maker--         and Giuseppe Donadio's StockPortfolioV1.0 stack--on openStackset cursor to busyglobal defaultScreen,selector,graphpatternhide menubarhide tool windowhide pattern window-- Now, ask to personalize copy if nothing in "Name" field on Title cardif line 3 of cd field "Name" is empty then -- not yet personalizedcustomizeend ifput cd field "pattern" of cd "prefs" into graphpatternput cd field "Default" of cd "prefs" into defaultScreenlock screeninitializeunlock screenput 0 into selector -- states that not choosing default screenif defaultScreen is not empty then -- go to customized start-up screenset lockmessages to true -- to avoid "double-checking"visual iris open fastgo cd defaultScreensend openCard to this cardend ifend openstackon closeStackshow menubarpass closestackend closeStackon closeCardif there is a bg field "help" thenif the visible of bg field "help" is true then hideHelpend ifif there is a cd field "help" thenif the visible of cd field "help" is true then hideHelpend ifend closeCardon customizeput "Please personalize your copy of the Financial Portfolio Stack by typing in your name below:" into qqAsk qq with "Type your name here"put it into namerput namer into line 3 of cd field "name" of cd "title"put "Financial Statement for "& namer into field title of cd networthput "Click on the ‚ÄúHelp‚Äù button when needed." & return & return into qqput "Click on ‚ÄúPrefs‚Äù to customize the program to your taste." & return & return after qqput "Click on ‚Äúimport‚Äù to import data from a previous version of this stack." after qqanswer qqend customizeon initialize -- sets up lists of stocks, banks & loansglobal listerglobal stocklist,banklist,loanlist,miscListset cursor to busyif bg field "lists" of first cd is not empty thenput line 1 of bg field "lists" of first cd into stocklistput line 2 of bg field "lists" of first cd into banklistput line 3 of bg field "lists" of first cd into loanlistput line 4 of bg field "lists" of first cd into misclistexit initializeend ifput empty into lister -- clear out listset cursor to busylock screenpush cdset lockmessages to trueset lockrecent to truecheckstockscheckbankscheckloanscheckMiscspop cdhide msgset lockmessages to falseend initializeon popupglobal lister,selecter,selectpickedput the top of the target into topperput the left of the target into lefter-- adjust locationadd 21 to topperadd 1 to lefterget HPopUpMenu(lister,0,topper,lefter)put item 1 of it into pickedif selecter is 1 then -- just selecting default, not going anywhereput picked into selectpickedpopUpselecthidedefaultexit popUpend ifif picked is empty then exit popup -- nothing pickedif picked contains "list" then -- no specific item picked, just categoryput empty into word 2 of picked -- erase second word ("list")put empty into last char of picked -- erase spaceput "title" after picked -- e.g., banktitle,loantitle,stocktitleif picked is "Misc.title" then put misctitle into pickedvisual iris opengo cd pickedexit popupend ifif picked is "Stock portfolio value" thenvisual checkerboard fastgo cd stockportend if-- if picked is "Capital gains" then-- visual iris open-- go cd "cap"-- end ifvisual iris opengo cd pickedend popupon popUpSelectglobal selectpicked,defaultScreen,selecterif selectpicked is empty thenput "Title" into selectpickedend ifif selectPicked is "title" then put line 3 of cd field "Name" of cd "title" into cd field "def"if selectPicked is not "title" then put selectPicked into cd field "def" of cd "prefs"if selectpicked contains "list" then -- no specific item picked, just categoryput empty into word 2 of selectpicked -- erase second word ("list")put empty into last char of selectpicked -- erase spaceput "title" after selectpicked -- e.g., banktitle,loantitle,stocktitleend ifif selectpicked is "Stock portfolio Value" then put stockport into selectpicked--if picked is "Capital gains" then put "cap" into selectpickedput selectpicked into defaultScreenput defaultScreen into cd field "default" of cd "prefs"put 0 into selecterend popUpSelecton hideDefault -- hides selection toolsglobal selecterlock screenput 0 into selecter -- no longer selectinghide cd field selectinfohide cd button "Title"hide cd button "Net Worth"show cd button "coverup"unlock screen with dissolve fastend hideDefaulton chosenselect the clickLineput the selectedText into topicPickedvisual iris opengo cd (topicPicked)end chosenon deleteThingput the short name of this cd into ccput the short name of this bg into bb -- type of account (banks, stocks...))put "Are you really sure you want to delete ‚Äú"&cc&"‚Äù?" into qqput return & return &"(It can‚Äôt be recovered if you delete it.)" after qqanswer qq with "Delete" or "DON‚ÄôT delete"if it is "Delete" thenanswer "Are you REALLY, REALLY sure?" with "DON'T delete" or "OK, delete"if it is "DON‚ÄôT delete" then exit deleteThinglock screenset lockmessages to trueset cursor to busygo prev cd of this bg -- mark this bg card so stay in this bgpush cdgo next cd of this bg -- to the cd you want to deleteset cursor to busydoMenu "Delete Card"pop cd -- to get back to this bgif bb is "stocks" then checkstocksif bb is "banks" then checkbanksif bb is "loans" then checkloansif bb is "Miscs" then checkMiscsend ifhide msgend deleteThingon countshares -- determine # shares held at this time-- and amount invested and avg. price/shareput 0 into ssput 0 into vvrepeat with x=1 to the number of lines of bg field "shares"put 0 into multif line x of bg field type is "buy" then put 1 into multif line x of bg field type is "div" thenif line x of bg field "shares" > 0 then put 1 into mult -- dividend paid by sharesend ifif line x of bg field type is "sell" then put (-1) into multif line x of bg field type is "split" then put 1 into multadd ((line x of bg field shares)*mult) to ssput line x of bg field value into valput empty into char 1 of val -- erase "$"add (val*mult) to vvend repeatset the numberformat to "0."put ss into bg field numsharesput "$"& vv into bg field "$$"set the numberformat to "0.000"put vv/ss into bg field "avg"end countshares-- ‚Ä¢‚Ä¢‚Ä¢‚Ä¢ CHECK Things ‚Ä¢‚Ä¢‚Ä¢‚Ä¢on checkstocksput "Checking stocks . . ."global stocklistgo cd "stocktitle"-- set up stock list for stocktitle card's fieldput empty into bg field "Stocks"put empty into stocklistlock screenpush cdsort bg "stocks" by bg field "stock" -- alphabetizeput the number of cds of bg stocks into ccrepeat with s=1 to ccset cursor to busygo cd s of bg stocksput (the short name of this cd) into s1if s1 is "blanker" then next repeatput s1 & return after bg field "Stocks" of cd stocktitleput s1 & "," after stocklistcountsharesend repeatput "Stock List,-," before stocklistput ",-,Stock Portfolio Value," after stocklist-- put "-,Capital gains" after stocklist -- ‚Ä¢‚Ä¢put stockList into line 1 of bg field "Lists" of first cdpop cdend checkstockson checkbanksput "Checking banks . . ."go cd "banktitle"-- set up bank list for banktitle card's fieldglobal banklistput empty into banklistput empty into bg field "stocks" -- keep this namelock screenpush cdsort bg "banks" by bg field "bank" -- alphabetizeput the number of cds of bg banks into ccrepeat with s=1 to ccset cursor to busygo cd s of bg banksput (the short name of this cd) into s1if s1 is "blanker" then next repeatput s1 & return after bg field "stocks" of cd banktitleput s1 & "," after banklistend repeatput "Bank List,-," before banklistput BankList into line 2 of bg field "Lists" of first cdpop cdend checkbankson checkLoansput "Checking loans . . ."go cd "loantitle"-- set up bank list for Loantitle card's fieldglobal loanlistput empty into loanlistput empty into bg field "stocks" -- keep this namelock screenpush cdsort bg "Loans" by bg field "Loan" -- alphabetizeput the number of cds of bg loans into ccrepeat with s=1 to ccset cursor to busygo cd s of bg Loansput (the short name of this cd) into s1if s1 is "blanker" then next repeatput s1 & return after bg field "stocks" of cd Loantitleput s1 & "," after loanlistend repeatput "Loan List,-," before loanlistput loanList into line 3 of bg field "Lists" of first cdpop cdend checkLoanson checkMiscsput "Checking misc. items . . ."go cd "Misctitle"-- set up list for Misctitle card's fieldglobal Misclistput empty into Misclistput empty into bg field "stocks" -- keep this name "stocks"lock screenpush cdsort bg "Miscs" by bg field "Misc" -- alphabetizeput the number of cds of bg Miscs into ccrepeat with s=1 to ccset cursor to busygo cd s of bg Miscsput (the short name of this cd) into s1if s1 is "blanker" then next repeatput s1 & return after bg field "stocks" of cd Misctitleput s1 & "," after Misclistend repeatput "Misc. List,-," before Misclistput miscList into line 4 of bg field "Lists" of first cdpop cdend checkMiscs-- ‚Ä¢‚Ä¢‚Ä¢ NEW Things ‚Ä¢‚Ä¢‚Ä¢on makenew -- find out what to makeput the short name of this card into nnrepeat with x=1 to 5 -- 5 letters in "title"put empty into last char of nnend repeatif nn is "stock" thennewstock -- special case since complicatedexit makeNewend if-- set up new cardask "What is the name of the new item?"repeat foreverif the result is "Cancel" then exit makenewput it into itemnameif the number of chars of itemname > 25 thenbeepask "Please limit length of name to 25 characters!" with itemnameelseexit repeat -- get out of loopend ifend repeatlock screenset cursor to busyput "s" after nngo last cd of bg nnput empty into last char of nn -- erases "s"doMenu "New Card"put itemname into bg field nnset name of this cd to itemnamepush card -- new bank's cardif nn is "bank" then checkbanksif nn is "loan" then checkloansif nn is "Misc" then checkMiscspop cd -- back to new item's cardunlock screenhide msggo this card -- to select proper field's textend makenewon newstockask "What is the new stock's name?"repeat foreverif the result is "Cancel" then exit to hyperCardput it into stocknameif the number of chars of stockname > 25 thenbeepask "Please limit length of name to 25 characters!" with stocknameelseexit repeat -- get out of loopend ifend repeatask "What is the new stock's symbol?"if it is "cancel" or it is empty thenrepeat foreverask "If you don't know the symbol, just make up a 3 or 4 letter symbol:"if it is not empty then exit repeatend repeatend ifput it into stocksymput return & return &"1=NYSE,2=AMEX,3=OTC,4=Mutual Fund,5=Misc" into yyask "    What exchange is the new stock on?" & yyif it is "cancel" or it is empty then exit to hyperCardput "?" into exchangeif it is "5" thenask "Which exchange?"put it into exchangeif it is empty then put "?" into exchangeif the result is "Cancel" then put "?" into exchangeput 0 into it -- to skip next stuffend ifif it is "1" then put "NYSE" into exchangeif it is "2" then put "AMEX" into exchangeif it is "3" then put "OTC" into exchangeif it is "4" then put "Mutual" into exchangeput "You wish to buy ‚Äò"& stockname &"‚Äô with sy